package com.youi.third.cloundmessage;

import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.Map;


import com.google.gson.JsonObject;
import com.youi.model.SmsObj;
import com.youi.third.cloundmessage.model.HttpUtils;
import com.youi.util.HttpUtil;

/**
 * 银行卡验证工具
 * @author XJY
 *
 */
public class BankcardUtil {
	
	private final static String APPID="1INdxlJS";
	private final static String APPKEY="cExuVZYR";
	private final static String URL="https://api.253.com/open/bankcard/card-three-auth-detail";
	
	/**
	 * 253银行卡验证工具
	 * @param name
	 * @param idNum
	 * @param cardNo
	 */	
	public static String cloundBankcardCheck(String name, String idNum, String cardNo) {
	        Map<String, String> params = new HashMap<String, String>();
	        params.put("appId", APPID);
	        params.put("appKey", APPKEY);
	        params.put("name", name);
	        params.put("idNum", idNum);
	        params.put("cardNo", cardNo);
	        String result = HttpUtils.post(URL, params);
	        return result;
	 }
	
	public static void main(String[] args) {
		System.out.println(cloundBankcardCheck("许锦运", "441225199506084910", "6212263602038185260"));
	}
}
